//
//  HemaConst.h
//  Hema
//
//  Created by LarryRodic on 15/10/5.
//  Copyright (c) 2015年 Hemaapp. All rights reserved.
//
///////////////////////////////////////////////////////////////
//                     尺寸设置                               //
///////////////////////////////////////////////////////////////

#define HM_ISIPHONE6PLUS ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)
#define HM_ISIPHONE6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define HM_ISIPHONE5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define HM_ISIPHONE4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define HM_ISIOS7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0//是不是ios7
#define HM_ISIOS8 [[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0//ios8以上
#define HM_ISIOS9 [[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0//ios9以上

#define UI_View_Height [UIScreen mainScreen].bounds.size.height//屏幕高度
#define UI_View_Width [UIScreen mainScreen].bounds.size.width//屏幕宽度
//纯粹放大适配
#define UI_Width_Scale ((HM_ISIPHONE6)?(375.0f/320.0f):((HM_ISIPHONE6PLUS)?(414.0f/320.0f):1.0f))
#define UI_Height_Scale ((HM_ISIPHONE6)?(1334.0f/1136.0f):((HM_ISIPHONE6PLUS)?(736.0f/568.0f):1.0f))

///////////////////////////////////////////////////////////////
//                     导航设置                               //
///////////////////////////////////////////////////////////////

#define Nav_TitleFont 20
#define Nav_TitleColor BB_White_Color
#define Nav_Color BB_Blue_Color //导航背景色

#define BackItemOffset UIEdgeInsetsMake(0, 5, 0, 0)
#define ItemLeftMargin 0
#define ItemWidth 48
#define ItemHeight 30
#define ItemTextFont 16
#define ItemTextNormalColot BB_White_Color

#define BackImgName @"返回.png"

//状态栏展示
#define Status_BackColor Nav_Color //背景颜色
#define Status_TitleColor BB_White_Color //字体颜色

///////////////////////////////////////////////////////////////
//                     加载刷新                               //
///////////////////////////////////////////////////////////////

#define RefreshNoData @"R暂无数据" //暂无数据
#define RefreshArrow [UIImage imageNamed:@"R刷新箭头.png"] //箭头
#define RefreshFont RGB_UI_COLOR(122, 135, 155) //字体的颜色

///////////////////////////////////////////////////////////////
//                     颜色相关                               //
///////////////////////////////////////////////////////////////

#define RGB_UI_COLOR(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1]

#define BB_Back_Color_Here [UIColor colorWithRed:243/255.0 green:244/255.0 blue:248/255.0 alpha:1.0f]//界面背景色
#define BB_Red_Color [UIColor colorWithRed:236/255.0 green:17/255.0 blue:26/255.0 alpha:1]//红色
#define BB_White_Color [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1]//白色
#define BB_Orange_Color [UIColor colorWithRed:1 green:0.64 blue:0 alpha:1]//橘黄色

#define BB_Blue_Color [UIColor colorWithRed:0.03 green:0.5 blue:0.71 alpha:1]//蓝色
#define BB_lineColor [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]//线条的颜色
#define BB_Gray_Color [UIColor colorWithRed:221/255.0 green:221/255.0 blue:221/255.0 alpha:1]//灰色
#define BB_Blake_Color [UIColor colorWithRed:54/255.0 green:54/255.0 blue:54/255.0 alpha:1]//黑色
#define BB_Border_Color [UIColor colorWithRed:231/255.0 green:231/255.0 blue:231/255.0 alpha:1]//边框的颜色
#define BB_Green_Color [UIColor colorWithRed:55/255.0 green:164/255.0 blue:169/255.0 alpha:1]//绿色
#define BB_Back_Color_Here_Bar [UIColor colorWithRed:245/255.0 green:245/255.0 blue:245/255.0 alpha:1.0f]//底部栏的颜色
//...其余颜色自己添加


///////////////////////////////////////////////////////////////
//                     系统常量                               //
///////////////////////////////////////////////////////////////

//配置
#define CoLocation CLLocationCoordinate2DMake(36.657587, 117.131358)//默认定位经纬度
#define BB_XCONST_IS_YLCeshi @"00"//银联是否是测试环境 00正式环境 01测试环境
#define BB_UMENG_APPKEY @"552f8068fd98c59352001e6f"//友盟key
#define BB_GEO_APIKEY @"a769dc47c85e2f748498c7fd1fa50c49"//高德地图key com.hemaapp.demo1
#define BB_ShareKey @"5577ff992136"//sharesdk的key 默认这个就可以
#define BB_ShareName @"HemaDemo"//分享的软件名称
#define BB_ScrollTime 3.0//轮播图的时间间隔
#define GDownLoad @"gdownload"//仅在WIFI下显示图片 1 仅 0 都可以

//缓存
#define BB_CASH_DOCUMENT @"hemacash"//缓存目录
#define BB_CASH_AVATAR @"avatar"//图片目录
#define BB_CASH_AUDIO @"audio"//语音目录
#define BB_CASH_VIDEO @"video"//视频目录

//第三方
#define BB_XCONST_LOCAL_PLATTYPE @"plattype"//第三方平台类型 0 没有 1：微信 2：QQ 3：微博
#define BB_XCONST_LOCAL_UID @"plattypeuid"//第三方平台 uid

//登录
#define BB_XCONST_ISAUTO_LOGIN @"isAutoLogin"//是否自动登录
#define BB_XCONST_LOCAL_LOGINNAME @"loginname"//登录名
#define BB_XCONST_LOCAL_PASSWORD @"localPWD"//登录密码
#define BB_XCONST_LAST_VERSION @"lastversion"//本地版本号
#define BB_XCONST_LOGIN_System @"login_System"//初始化信息

//聊天
#define BB_XCONST_Chat_ID @"dx_chat_id"
#define BB_XCONST_Chat_PWD @"dx_chat_pwd"
#define BB_XCONST_Chat_Server @"dx_chat_server"

#define Chat_DataName @"hema.db"//数据库名称

//通知
#define BB_NOTIFICATION_OrderOK @"orderOK"//订单第三方支付成功
#define BB_NOTIFICATION_OrderFail @"orderFail"//订单第三方支付失败

#define BB_NOTIFICATION_BaiDuMessage @"baiduMessage"//百度云推送消息的通知
#define BB_NOTIFICATION_SEND_MESSAGE @"sendMessage"//聊天发送消息成功的通知
#define BB_NOTIFICATION_NOSEND_MESSAGE @"nosendMessage"//聊天发送消息失败的通知
#define BB_NOTIFICATION_GET_MESSAGE @"getMessage"//聊天收到消息的通知

#define Button_Scan @"查看大图"
#define Button_Albums @"相册"
#define Button_Camera @"拍照"
#define Button_Cancel @"取消"
#define Button_Read @"全部已读"
#define Button_Delete @"全部删除"

///////////////////////////////////////////////////////////////
//                      存储数据                              //
///////////////////////////////////////////////////////////////

#define SaveSearchWord @"SaveSearchWord"//保存搜索名称
#define SaveLastCityArr @"SaveLastCityArr"//最近访问城市数组 最多三个
#define CityName @"CityName"//保存城市名称
#define CityId @"CityId"//保存城市id
#define DownName @"DownName"//保存县区名称
#define DownId @"DownId"//保存县区id
#define LocalCityName @"LocalCityName"//保存定位城市名称
#define LocalCityId @"LocalCityId"//保存定位城市id

///////////////////////////////////////////////////////////////
//                       逻辑相关                             //
///////////////////////////////////////////////////////////////

//#define REQUEST_MAINLINK_ROOT @"http://124.128.23.74:8008/group5/hm_qixin/"
#define REQUEST_MAINLINK_ROOT @"http://124.128.23.74:8008/group4/hm_klock/"
#define REQUEST_MAINLINK_INIT [NSString stringWithFormat:@"%@index.php/Webservice/",REQUEST_MAINLINK_ROOT]
#define REQUEST_MAINLINK [HemaFunction getRootPath]//服务器根地址

//---------------基础接口
#define REQUEST_SYSTEM_INIT @"index/init"//系统初始化
#define REQUEST_CODE_GET @"code_get"//申请验证码接口
#define REQUEST_CODE_VERIFY @"code_verify"//验证验证码
#define REQUEST_CLIENT_LOGIN @"client_login"//登陆接口
#define REQUEST_PLATFORM_SAVE @"platform_save"//第三方登录接口
#define REQUEST_CLIENT_ADD @"client_add"//注册接口
#define REQUEST_CLIENT_LOGINOUT @"client_loginout"//退出登录
#define REQUEST_CLIENT_SAVE @"client_save"//保存个人资料
#define REQUEST_CLIENT_GET @"client_get"//获取个人资料
#define REQUEST_PASSWORD_SAVE @"password_save"//修改密码
#define REQUEST_CLIENT_VERIFY @"client_verify"//找回密码 验证用户
#define REQUEST_PASSWORD_RESET @"password_reset"//找回密码 重设密码
#define REQUEST_POSITION_SAVE @"position_save"//保存位置
#define REQUEST_FILE_UPLOAD @"file_upload"//上传文件
#define REQUEST_DEVICE_SAVE @"device_save"//硬件注册
#define REQUEST_CHATPUSH_ADD @"chatpush_add"//聊天百度推送
#define REQUEST_MOBILE_LIST @"mobile_list"//邀请通讯录号码安装软件接口
#define REQUEST_REMOVE @"remove"//通用删除接口
#define REQUEST_ADVICE_ADD @"advice_add"//意见反馈
#define REQUEST_NOTICE_LIST @"notice_list"//通知列表
#define REQUEST_NOTiCE_SAVEOPERATE @"notice_saveoperate"//通知操作

#define REQUEST_AD_LIST @"ad_list"//广告列表接口
#define REQUEST_DISTRICT_LIST @"district_list"//地区列表
#define REQUEST_IMG_LIST @"img_list"//相册列表

#define REQUEST_BANK_SAVE @"bank_save"//存储银行卡信息
#define REQUEST_ALI_SAVE @"ali_save"//保存用户提现支付宝信息
#define REQUEST_BANK_LIST @"bank_list"//银行列表
#define REQUEST_CASH_ADD @"cash_add"//提现申请
#define REQUEST_CASH_LIST @"cash_list"//提现列表
#define REQUEST_RECHARGE @"recharge" //充值和支付
#define REQUEST_WEIXIN_SAVE @"weixin_save" //保存用户提现微信信息
#define REQUEST_PAYPASSWORD_SAVE @"paypassword_save" //保存支付密码
#define REQUEST_ISEXIT_PAYPASSWORD @"is_exist_paypassword" //检测是否设置了支付密码
#define REQUEST_ACCOUNT_LIST @"account_list" //获取金额明细

#define REQUEST_FRIEND_ADD @"friend_add"//保存好友
#define REQUEST_FRIEND_REMOVE @"friend_remove"//移除好友
#define REQUEST_CLIENT_LIST @"client_list"//成员列表
#define REQUEST_CLIENT_SAVEOPERATE @"client_saveoperate"//保存用户关系操作

//---------------Demo接口
#define REQUEST_HIDE_IDLIST_GET @"hide_idlist_get"//获取屏蔽消息的群组/用户id串接口
#define REQUEST_BLOG_LIST @"blog_list"//获取帖子列表
#define REQUEST_BLOG_ADD @"blog_add"//保存帖子

//群组
#define REQUEST_GROUP_ADD @"group_add"//添加讨论组
#define REQUEST_GROUP_LIST @"group_list"//讨论组列表
#define REQUEST_GROUP_GET @"group_get"//讨论组详情
#define REQUEST_GROUP_SAVEOPERATE @"group_saveoperate"//保存群组操作
#define REQUEST_GROUP_CLIENT_LIST @"group_client_list"//群组人员列表
/******/
#define IMAGE(image) [UIImage imageNamed:image]
#define TEST(test) self.text = text;
#define FONT(a) [UIFont systemFontOfSize:a]

/******KISSLOCK******/
#define REQUEST_OPENLOCK_HISTORY @"openlock_history" //获取开锁记录
#define REQUEST_GRANT_LOCK @"grant_lock_newversion" //获取二级锁主列表
#define REQUEST_KEY_GRANT @"key_grant" //获取二级锁主子钥匙列表
#define REQUEST_LOCK_LIST @"get_locklist_newversion" //设备列表
#define REQUEST_PHONE_LIST @"phone_list" //历史手机号列表
#define REQUEST_KEY_LIST @"get_keylist_newversion"  //钥匙列表
#define REQUEST_UPLOAD_OPENLOCK_HISTORY @"upload_openlock_history" //获取开锁记录
#define REQUEST_RECEIVE_KEY @"receive_key" //收到的钥匙列表
#define REQUEST_ACCOUNT_LIST @"account_list"//账户明细
#define REQUEST_SUM_ACCOUNT @"account_sum_get"//账户总额
#define REQUEST_CHANAGE_PHONENUMBER @"mobile_change"//更改手机号
#define REQUEST_LOCK_ADD @"lock_add_newversion"//扫二维码添加钥匙
#define REQUEST_KEY_ADD @"send_key"//授权用户钥匙
#define REQUEST_KEY_DETSIL @"key_get"//钥匙信息
#define REQUEST_YUE_ALPAY @"feeaccount_remove" //余额支付
#define REQUEST_GET_BALANCE @"get_balance" //获取余额信息
#define REQUEST_LOCK_STATUS @"lock_status" //是否允许该锁暴露被申请权限
#define REQUEST_MAY_APPLY_LOCK @"get_apply_device" //允许暴露的锁列表
#define REQUEST_APPLICATION_KEY @"application_key_newversion" //申请钥匙
#define REQUEST_LOCK_APPLY_MESSAGE @"lock_apply_message_newversion" //获取申请钥匙的消息列表
#define REQUEST_APPLICANTS_ID_MESSAGE @"applicants_id_message_newversion" //获取已经申请的记录
#define REQUEST_APPLICATION_PASS @"agree_apply_key" //锁主是否同意申请单把钥匙
#define REQUEST_DELETE_APPLICATION @"delete_application"//删除申请
#define REQUEST_CHECK_NEW_APPLY @"check_new_apply" //检查是否有新申请
#define REQUEST_GIVE_UP_LOCKRIGHT @"give_up_lockright_newversion" //放弃锁主权限
#define REQUEST_CHECK_VESION @"check_version" //检查版本是否有更新
#define REQUEST_UPDATE_KEYS @"update_keys" //更新所有临时钥匙
#define REQUEST_GET_NEW_GROUP @"get_new_group" //创建钥匙串
#define REQUEST_GET_GROUPLIST_SEND @"get_grouplist_send" //获取所有创建/发出的钥匙串
#define REQUEST_UPDATE_GROUP_STATUS @"update_group_status" //是否允许钥匙串被他人申请
#define REQUEST_GET_GROUP_LOCKLIST @"get_group_locklist" //获取该组内的所有锁
#define REQUEST_GET_EDITGROUP_LOCKLIST @"get_editgroup_locklist" //编辑该组内的锁
#define REQUEST_SAVE_EDIT_GROUP @"save_edit_group" //修改该组内的锁

#define REQUEST_OPEN_LOCK @"lock_opened"//开锁记录
#define REQUEST_RECORD_MYLOCK_SERVICE @"record_mylock_service"//返回的锁信息
#define REQUEST_UPDATE_LOCK_NAME @"update_lock_name" //修改锁别名
#define REQUEST_UPDATE_KEY_NAME @"update_key_name" //修改子钥匙别名
#define REQUEST_EDIT_ADDRESS @"edit_address" //修改锁地址
#define REQUEST_GET_KEY_PRICE @"getkeyprice_newversion" //获取子钥匙价格
#define REQUEST_GRANT_LOCK_PRICE @"grant_lock_price" //获取委托价格表
#define REQUEST_KEY_REMOVE @"key_remove" //删除单个的子钥匙
#define REQUEST_SERINUMBER_INCREASE @"serinumber_increase" //删除临时钥匙
#define REQUEST_RECEIVE_COMMAND @"receive_command" //委托命令
#define REQUEST_GET_COMMOND_LIST @"get_command_list_newversion" //获取所有委托命令
#define REQUEST_UPDATE_STATUS @"update_status_newversion" //委托命令执行成功
#define REQUEST_KEYSTRING_ADD @"keystring_add" //发送钥匙串

#define MASTER_KEY_ARRAY @"masterKeyArray"
#define SUBMIT_KEY_ARRAY @"submitKeyArray"



#define PRIVATEKEY @"MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALWmCkRqObfHSLZSK7uHVzy1qWDNOsq/mGJMEPHLWgS91cZxyCqx6waxPhqlHjjnvqg4ZgpVG85UOP5oOWtIxNbGamLtPINV1mfBdEMo+f42dLFepcRDNR/je1sTR/o1Vmil2UBewV/mh+FG/9NHIdswYyIYJ9U8JTDPUVJUIVdhAgMBAAECgYAo7fvcRI8y0M2af1NpUuqePFSpAjVgH+HHLFqZEPf8n4W+zD6NGD/b5y4WNORlcBpurx6W72xvhly9PmDJwsDPPv2BE/hnzRP7B0YRnuVvE8qTRilDsKRjO/BAzSMx2cyGWmqAXUHp/6Z7SEfCpxLOiBdcxlxpFlkvv/8HqS1fLQJBANu993Eb09IIWPMCpWvBMev2+4gICiyf/j1CDPMMwcCg2P8s5pishR+bazzpzANOn2ZN9kP8pHpNzTegHyjjwysCQQDTnvu6pmtKHVnDPjv3CUxHRciMZD5UFtLnXSkSe+azHLUZBhFq7JiYjxuwRIq58cBts4Ul/b7CmXIrPgaYNrmjAkAlM3DrpjFjEmS0p1MH/goMj6Cfs/S8/00UY9U7ZIJ8sP5rnNdhK3vSEQbDpjUSrkHQGQzDD8dsqTU/4IzF6GFHAkBVj0TVrS1ZtM4y+zmBYrf9ZQB1ip4Mn4G721WczI10w1mQ+XwXT/tOSyX1uXChR1X2xItD1fjHcwTO6O//oLijAkAZXNg9W6mfdwZof7L037bFsXufsgVPumAXAdV0Acv/2id+xGeqLrnFq7fvtskoPMsU2EvDZQG1DXpg72l8DxkH"

#define PUBLICKEY @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDboIXhTqsKOkmZdvBeNNIxi26UDMduMnb5Pb74ihrn5ll/3NL57+3P2CTbk9ogQe3S5utb1rbeQttMxHuHaIyeOpBaxfMf5H4Dnz8EFUFp4MB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tLnXSkSe+azHLUZBhFq7JiYjxuwRIq58cBts4Ul/b7CmXIrPgaYNrmjAkAlM3DrpjFjEmS0p1MH/goMj6Cfs/S8/00UY9U7ZIJ8sP5rnNdhK3vSEQbDpjUSrkHQGQzDD8dsqTU/4IzF6GFHAkBVj0TVrS1ZtM4y+zmBYrf9ZQB1ip4Mn4G721WczI10w1mQ+XwXT/tOSyX1uXChR1X2xItD1fjHcwTO6O//oLijAkAZXNg9W6mfdwZof7L037bFsXufsgVPumAXAdV0Acv/2id+xGeqLrnFq7fvtskoPMsU2EvDZQG1DXpg72l8DxkH"
//#define PRRIVATES @"YTozOntpOjA7czoxMjg6IhW/UoTbZVBfUYQ+hWHb/dEiLHrn517DHDpejx9dwxurv6nibiI7w8JBkgbXR2ErrTvnZr72FnMdCMGMcsOS0A3/L6PBltNugNpvPD1lrAp33W3BI0dEEaby96/syT46v6IAzwOQdKgj26Scsuc0jOgcQFJLHsYVJPd1oG60iPHUIjtpOjE7czoxMjg6ImFAkoqXz/74TBIqK/GXk39HitSIPAFvU4/U0JB6RGGs3M7BZmF/EXHMsXIgWyCPjYBEzROPXfHvxvBX09A6gUGZPPQmqJRssfVpWvBhARk9LERCrBMeP/BmeYGT1HQwKDFJRRGzwvgL9EdgrjBqct1K04d8HJ9Qpqb5dplA0sErIjtpOjI7czo3OiJwcml2YXRlIjt9"

//==================我们自己的定义=================
#define infoDictionary [[NSBundle mainBundle] infoDictionary]

#define lastloginversion [infoDictionary objectForKey:@"CFBundleShortVersionString"]

#define devicetype @"1"

#pragma mark 2.0 *****主路径******
//192.168.0.241/kisslock/index.php/Webservice/V200/接口名称  
#define MainPath @"/kisslock/index.php/Webservice/V200/" // 主url 路径
#define REQUEST_check_gesturepassword @"check_gesturepassword" // 5.验证手势密码
#define REQUEST_get_updated_operations @"get_updated_operations" // 6.获取免密操作列表



